import React, {PureComponent} from 'react'
import {View, Image, StyleSheet, TouchableOpacity, Text, Dimensions, Button, Platform} from 'react-native'
import PDFLook from "../../page/course/PDFLook";
const {width} = Dimensions.get('window')


type Props = {
    navigation:any,
    info: Object,
}
export default class PDFListCell extends PureComponent<Props>{

    render(){

        let lesson = this.props.info.item

        return <TouchableOpacity onPress={()=>{
            this.props.navigation.navigate('PDFLook',{path:lesson.path,name:lesson.name})
        }} style={{flexDirection:'row',paddingTop:10,paddingBottom:10,backgroundColor:'white',marginLeft:12,marginRight:12,alignItems:'center',borderRadius:4,}}>
            <Image style={{width:60,height:60,marginLeft:10}} source={require('../../../res/img/minecourse/lesson_pdf.png')}/>
            <Text numberOfLines={1} style={{color:'#333333',fontSize:16,fontWeight:'bold',marginRight:10,marginLeft:10,maxWidth:(width - 110)}}>{lesson.name}</Text>
        </TouchableOpacity>
    }
}